import moment from 'moment';

export default {
  systemConstants: {
    dateFormat: {
      frontEnd: 'YYYY-MM-DD',
      backEnd: 'YYYY-MM-DD HH:mm:s'
    },
    range: [moment().add(-3, 'months'), moment()],
    pageSize: 10,
    pageSizeOption: ['10', '30', '50'],
    appStatus: {
      1: '有效',
      0: '下线'
    },
    index: {
      status: {
        1: '停用',
        0: '正常'
      }
    },
    control: {
      status: {
        3: '失败',
        2: '成功',
        1: '执行中',
        0: '待执行'
      },
      indexBuildType: {
        0: '全量',
        1: '增量'
      },
      gradingType: {
        0: '全索引',
        1: '单数据源'
      },
      runType: {
        0: '定时触发',
        1: '人工触发 '
      },
    },
    controlStatus: {
      1: '成功',
      0: '失败'
    },
    controlType: {
      1: '全索引',
      2: '单数据源'
    },
    controlPattern: {
      1: 'SQL',
      2: 'HTTP'
    },
    datasource: {
      incDatasourceType: {
        1: '配置增量'
      },
      datasourceTypes: {
        0: 'JSON_RPC',
        1: { value: '消息队列（暂不支持）', disabled: true },
        2: { value: '数据库SQL（暂不支持）', disabled: true }
      }
    }
  },
  crumbMap: {
    "key": "/app",
    "name": "项目管理",
    "child": [
      {
        "key": "/index",
        "name": "索引管理",
        "parameterKey": "projectId",
        "child": [
          {
            "key": "/datasource",
            "name": "数据源管理"
          },
          {
            "key": "/control",
            "name": "调度管理"
          },
          {
            "key": "/query",
            "name": "数据查询"
          }
        ]
      }
    ]
  },
};
